home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / icon.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-10  |  1.2 KB  |  46 lines

  1. /* ICON.H   Icon is a picture in Frame. Picture is the image obtained
  2.    with getimage. Program for icons resourse file creation
  3.    is mkicon.exe, sourse codes are listed in mkicon.prj.
  4. */
  5.  
  6. #ifndef __ICON_H_
  7. #define __ICON_H_
  8.  
  9. #include <stdio.h>
  10. #include "press.h"
  11. #include <alloc.h>
  12. #include "ic_part.h"
  13.  
  14. extern loc icon_size(int icon_type);
  15. extern void save_image(char* fName, loc pos, int type);
  16. extern imageP get_image(char* fName, int type, int num = 1);
  17. extern void get_image(FILE* stream, int num, imageP image,
  18.     int i_size);
  19.  
  20. class Icon : public Press
  21.     {
  22.     int num;       // number in resource file
  23.     int type;      // 1, 2, or 3 type of icon
  24.     public:
  25.     Icon(loc c, int n, int icon_type, BORDERS b_type = NO_BORDER)
  26.         : Press(rect(c, c + pScreenSet->icon_types[icon_type]),
  27.             b_type, 0)
  28.         {
  29.         num = n;
  30.         type = icon_type;
  31.         }
  32.  
  33.     virtual void show();
  34.  
  35.         char* icon_open();         // Return name of *.res file
  36.     void hilite();
  37.     void unhilite()  { hilite(); }
  38.     virtual void press();
  39.     virtual void release();
  40.     imageP extract();    // extracts image from XGA.RES file
  41.     void icon_set(loc c, int n);
  42.     };
  43.  
  44.  
  45.  
  46. #endif __ICON_H_